package com.qianyucc.blog.global;

import java.util.*;

/**
 * @author lijing
 * @date 2019-10-18 20:37
 * @description 存储博客中常量
 */
public class Constants {
    public static final int DEFAULT_PAGE_SIZE = 5;
    public static final int ADMIN_PAGE_SIZE = 10;
    public static final String DEFAULT_DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm";
    public static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
    public static final String CSS_FONT_RED = "<font style='color:red;'>$0</font>";
    public static final String TAOBAO_IP_INFO = "http://ip.taobao.com/service/getIpInfo.php";

    public static Map<String, Object> queryMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("offset", 0);
        map.put("size", DEFAULT_PAGE_SIZE);
        return map;
    }

    public static class ConfigKey {
        // 姓名
        public static final String NAME = "name";
        // 个人简介
        public static final String INTRODUCTION = "introduction";
        // 头像链接
        public static final String AVATAR = "avatar";
        // 座右铭
        public static final String MOTTO = "motto";
        // 管理员用户名
        public static final String USERNAME = "username";
        // 管理员密码
        public static final String PASSWORD = "password";
        // 管理员token
        public static final String ADMIN_TOKEN = "admin_token";
        // 博客名称
        public static final String BLOG_NAME = "blog_name";
        // 博客描述
        public static final String BLOG_DESC = "blog_desc";
        // 博客图标
        public static final String BLOG_ICON = "blog_icon";
        // 笔名
        public static final String PEN_NAME = "pen_name";
        // 网站导航内容
        public static final String WEBSITES = "websites";
    }
}
